#include"ros/ros.h"
#include"turtlesim/Spawn.h"
int main(int argc, char *argv[])
{
    ros::init(argc,argv,"lng");
    ros::NodeHandle nh;
    ros::ServiceClient client=nh.serviceClient<turtlesim::Spawn>("/spawn");
    turtlesim::Spawn spawn;
    spawn.request.name="scout";
    spawn.request.theta=1.57;
    spawn.request.x=1.0;
    spawn.request.y=4.8;
    client.waitForExistence();
    bool flag=client.call(spawn);
    if(flag)
    {
        ROS_INFO("name is :%s",spawn.response.name.c_str());
    }
    else
       ROS_INFO("error");
    ros::spin();
    return 0;
}
